package com.xinfu.newproject.adapter.setting;


import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.xinfu.newproject.R;
import com.xinfu.newproject.data.DataServer;
import com.xinfu.newproject.entity.Status;


/**
 * https://github.com/CymChad/BaseRecyclerViewAdapterHelper
 */
public class SettingAdapter extends BaseQuickAdapter<Status, BaseViewHolder> {

    public SettingAdapter(int dataSize) {
        super(R.layout.recycler_setting, DataServer.getSampleData(dataSize));
    }

    @Override
    protected void convert(BaseViewHolder helper, Status item) {

        switch (helper.getLayoutPosition() %
                3) {
            case 0:
                helper.setText(R.id.recycler_setting_tv, "关于我们");
                break;
            case 1:
                helper.setText(R.id.recycler_setting_tv, "清除缓存");
                break;
            case 2:
                helper.setText(R.id.recycler_setting_tv, "版本号");
                break;
            default:
                break;
        }
    }


}
